@import "../../style/themes/default";
@import "../../style/mixins/index";

@tag-prefix-cls: ~"@{ant-prefix}-tag";

.@{tag-prefix-cls} {
  display: inline-block;
  line-height: 20px;
  height: 22px;
  padding: 0 8px;
  border-radius: @border-radius-base;
  border: 1px solid @border-color-split;
  background: @background-color-base;
  font-size: @font-size-base;
  transition: all 0.3s @ease-in-out-circ;
  vertical-align: middle;
  opacity: 1;
  overflow: hidden;
  margin: 4px 8px 4px 0;
  cursor: pointer;

  &:hover {
    opacity: 0.85;
  }

  &,
  a,
  a:hover {
    color: @text-color;
  }

  &-text {
    a:first-child:last-child {
      display: inline-block;
      margin: 0 -8px;
      padding: 0 8px;
    }
  }

  .@{iconfont-css-prefix}-cross {
    .iconfont-size-under-12px(10px);
    cursor: pointer;
    font-weight: bold;
    margin-left: 3px;
    color: @text-color;
    transition: all 0.3s ease;
    opacity: 0.66;

    &:hover {
      opacity: 1;
    }
  }

  &-has-color {
    border-color: transparent;
    &,
    a,
    a:hover,
    .@{iconfont-css-prefix}-cross,
    .@{iconfont-css-prefix}-cross:hover {
      color: #fff;
    }
  }

  &-blue {
    background: @link-color;
  }

  &-green {
    background: @success-color;
  }

  &-yellow {
    background: @warning-color;
  }

  &-red {
    background: @error-color;
  }

  &-checkable {
    background-color: transparent;
    border-color: transparent;

    &:hover,
    &:active,
    &-checked {
      color: #fff;
    }
    &:hover {
      background-color: tint(@primary-color, 20%);
    }
    &:active,
    &-checked {
      background-color: shade(@primary-color, 5%);
    }
  }

  &-close {
    width: 0 !important;
    padding: 0;
    margin: 0;
  }

  &-zoom-enter,
  &-zoom-appear {
    animation: antFadeIn .2s @ease-in-out-circ;
    animation-fill-mode: both;
  }

  &-zoom-leave {
    animation: antZoomOut .3s @ease-in-out-circ;
    animation-fill-mode: both;
  }
}
